<?php

/**
 * SocialEngine
 *
 * @category   Application_Extensions
 * @package    Sitealbum
 * @copyright  Copyright 2010-2011 BigStep Technologies Pvt. Ltd.
 * @license    http://www.socialengineaddons.com/license/
 * @version    $Id: Global.php 2011-08-026 9:40:21Z SocialEngineAddOns $
 * @author     SocialEngineAddOns
 */
class Seaocore_Form_Admin_Infotip extends Engine_Form {

  public function init() {

     $informationArray = array(
        	"category" => "Content Type and Category (For Content Items)",
          "like" => "Likes (For Content Items)",
          "friendcommon" => "Friends' Likes (For Content Items, Shows the number of friends who Like the
content item and also nicely displays thumbnail photos of some friends.)",
          "mutualfriend" => "Mutual Friends (For Users, Shows the number of mutual friends with the
respective user and also nicely displays thumbnail photos of some friends.)",
  				"eventmember" => "Members Attending (For Events, Shows the number of members attending the event.)",
          "attendingeventfriend" => "Friends Attending (For Events, Shows the number of friends attending the
event and also nicely displays thumbnail photos of some friends.)",
					"groupmember" => "Total Members (For Groups, Shows the number of members of the group.)",
       		"joingroupfriend" => "Friends who are Members (For Groups, Shows the number of friends who are
members of the group and also nicely displays thumbnail photos of some friends.)",
        );
       $actionLinkArray = array(
        	"addfriend" => "Add Friend (For Users)",
					"message" => "Message (For Users)",
          "share" => "Share (For Content Items)"
        );
        $pokeEnabled = Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('poke');
				$suggestionEnabled = Engine_Api::_()->getDbtable('modules', 'core')->isModuleEnabled('suggestion');
				if (!empty($suggestionEnabled)) {
				  $actionLinkArray["suggestion"] = "Suggest to Friends (For Content Items and Friends)";
				}
				if (!empty($pokeEnabled)) {
					$actionLinkArray["poke"] = "Poke (For Users)";
				}
		
        // VALUE FOR AJAX LAYOUT
      $this->addElement('MultiCheckbox', 'seaocore_action_link', array(
        'description' => 'Choose the Action Links that you want to be available in the Info Tooltips for the
various content types and users. Action Links will enable users to quickly perform a relevant action on the
entity, thus increasing interactivity. (Format below: LINK_TEXT (For ENTITY_CONTENT_TYPE))',
        'label' => 'Action Links',
        'multiOptions' => $actionLinkArray,
        'value' => Engine_Api::_()->getApi('settings', 'core')->getSetting('seaocore.action.link',
				array("poke" => "poke", "share" => "share", "message" => "message", "addfriend" => "addfriend",
				"suggestion" => "suggestion")),
						));

        // VALUE FOR AJAX LAYOUT
      $this->addElement('MultiCheckbox', 'seaocore_information_link', array(
        'description' => 'Choose the Information that you want to be available in the Info Tooltips for the
various content types and users. The information will be useful meta-data for the entity, and will motivate
users to explore the respective content / user. (Format below: INFORMATION (For ENTITY_CONTENT_TYPE,
DESCRIPTION))',
        'label' => 'Information',
        'multiOptions' => $informationArray,
        'value' => Engine_Api::_()->getApi('settings',
        'core')->getSetting('seaocore.information.link',
				array( "category" => "category", "like" => "like" , "eventmember" =>
				"eventmember",	"groupmember"		=>	"groupmember", "mutualfriend" => "mutualfriend" , "friendcommon"
         => "friendcommon",	"joingroupfriend" =>		"joingroupfriend", "attendingeventfriend" =>
         "attendingeventfriend" )),
			));


    // Element: submit
    $this->addElement('Button', 'submit', array(
        'label' => 'Save Changes',
        'type' => 'submit',
        'ignore' => true
    ));
  }
}
?>